let path = require("path");
// const HtmlWebpackPlugin = require("html-webpack-plugin")
let myPlugin = require("./plugin/myplugin");
module.exports = {
    mode: "development",
    entry: "./src/index.js", // 模块打包依赖的入口文件
    output: {
        filename: 'boundle.js',
        path: path.resolve(__dirname, "dist")
    },
    module: {
        rules: [{
            test: /\.less$/,
            use: [
                path.resolve(__dirname, "loader", "style-loader"),
                path.resolve(__dirname, "loader", "less-loader")
                // "style-loader",
                // "css-loader",
                // "less-loader"
            ]
        }]
    },
    plugins: [
        new myPlugin()
        // new HtmlWebpackPlugin({
        //     template: "./public/index.html", // 要打包输出哪个文件，可以使用相对路径
        //     filename: "index.html" // 打包输出后该html文件的名称
        // })
    ]
}